package com.toocms.jinjuhang.ui.mine.involved_result

import androidx.databinding.ObservableArrayList
import com.toocms.jinjuhang.BR
import com.toocms.jinjuhang.R
import com.toocms.jinjuhang.ui.mine.involved_result.details.InvolvedResultDetailsFgt
import com.toocms.jinjuhang.ui.system.ImageItemModel
import com.toocms.tab.base.BaseViewModel
import com.toocms.tab.base.ItemViewModel
import com.toocms.tab.binding.ItemBinding
import com.toocms.tab.binding.command.BindingAction
import com.toocms.tab.binding.command.BindingCommand

class InvolvedResultItemModel(viewModel: BaseViewModel<*>) :
    ItemViewModel<BaseViewModel<*>>(viewModel) {

    val imageItems = ObservableArrayList<ImageItemModel>()
    val imageItemBinding = ItemBinding.of<ImageItemModel>(BR.imageItemModel, R.layout.item_image)


    val itemClickBindingCommand = BindingCommand<BindingAction>(BindingAction {
        viewModel.startFragment(InvolvedResultDetailsFgt::class.java)
    })


    init {
        imageItems += ImageItemModel(viewModel)
        imageItems += ImageItemModel(viewModel)
        imageItems += ImageItemModel(viewModel)
        imageItems += ImageItemModel(viewModel)
        imageItems += ImageItemModel(viewModel)
        imageItems += ImageItemModel(viewModel)
        imageItems += ImageItemModel(viewModel)
    }
}